<!DOCTYPE html>
<html>
    <head>
        <title><?= ($this->title) ? $this->title : $this->__('Blog for developers and not only') ?> - Shagtv.me</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="Помощь программистам, статьи, уроки, тесты, mysql, javascript, symfony, apache, mongodb">
        <meta name="keywords" content="apache, php, mysql, javascript, symfony, разработка, создангие сайтов, shagtv">
        <meta name="author" content="Timur Shagiakhmetov">
        <link rel="stylesheet" type="text/css" href="/static/js/jquery-ui-1.10.1.custom/css/smoothness/jquery-ui-1.10.1.custom.min.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/admin.css" />
    </head>
    <body class="admin">
        <a href="/">На главную</a> | <a href="/hide/admin/">В админку</a> | <a href="/hide/admin/all/">Все статьи</a> | <a href="/hide/admin/new/">Новая статья</a>
        <hr>

        <table id="all_posts" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
            <thead>
            <tr>
                <th class="header">ID</th>
                <th class="header">Название</th>
                <th class="header">Категория</th>
                <th class="header">Пользователь</th>
                <th class="header">Дата</th>
                <th></th>
                <th></th>
            </tr>
            </thead>
            <tbody>
        <?php foreach ($this->posts as $k => $post): ?>
            <tr class="<?= ($k%2 == 0) ? 'odd' : 'even' ; ?>">
                <td><?= $post->id; ?></td>
                <td><a href="/post/<?= $post->id; ?>" target="_blank"><?= $post->title; ?></a></td>
                <td><?= $post->category; ?></td>
                <td><?= $post->user; ?></td>
                <td><?= $post->date; ?></td>
                <td>Редактировать</td>
                <td>Удалить</td>
            </tr> 
        <?php endforeach; ?>
            </tbody>
        </table>
<script src="/static/js/jquery-ui-1.10.1.custom/js/jquery-1.9.1.js"></script>
<script src="/static/js/jquery-ui-1.10.1.custom/js/jquery-ui-1.10.1.custom.min.js"></script>
<script src="/static/js/jquery-ui-1.10.1.custom/js/jquery.tablesorter.min.js"></script>
<script src="/static/js/admin.js"></script>
</body>
</html>
